$INCLUDE: 'C:\FG\FASTGRAF.FI'

      PROGRAM MAIN

      INTEGER B, X, Y
      INTEGER STATUS
      INTEGER FG_BUTTON, FG_GETXJOY, FG_GETYJOY, FG_INITJOY

      CALL FG_INITPM
      STATUS = FG_INITJOY(1)
      STATUS = FG_INITJOY(2)

10    X = FG_GETXJOY(1)
      Y = FG_GETYJOY(1)
      B = FG_BUTTON(1)
      WRITE(6,1000) '1', X, Y, B
      X = FG_GETXJOY(2)
      Y = FG_GETYJOY(2)
      B = FG_BUTTON(2)
      WRITE(6,1000) '2', X, Y, B
      WRITE(6,1000)
      CALL FG_WAITFOR(9)
      GO TO 10

      STOP ' '
1000  FORMAT(1X,A1,': ',2I4,I2)
      END
